<template>
  <div>
    <div class="title">
      <el-row>
        <el-col :span="1" style="width: 50px;">
          <span style="color:#757575;">位置 :</span>
        </el-col>
        <el-col :span="20">
          <span class="hand"></span>
        </el-col>
        <el-col :span="20">
          <span @click="tableshow" class="hand" :class="{'textactive' : !secondshow}">今日任务</span>
          <span v-if="secondshow" :class="{'textactive' : secondshow}">> {{secondtitle}}</span>
        </el-col>
      </el-row>
    </div>
    <div id="chart"></div>
    <div class="posttable" v-if="!detailShow">
      <el-row type="flex" justify="space-between" style="background-color: #fff;">
        <el-col style="width: 50%;">
          <el-col class="tabletitle" style="padding-left: 20px;">
            <h4>岗位任务</h4>
          </el-col>
          <el-col style="background-color: #fff;">
            <el-row type="flex" justify="center">
              <el-col :span="23">
                <el-table
                  ref="singleTable6"
                  :data="tableData6"
                  @current-change="handleCurrentChange6"
                  :row-class-name="tableRowClassName"
                  class="gangwei"
                >
                  <el-table-column label="岗位" width="155px">
                    <template slot-scope="scope">
                      <span style="color: #757575;overflow: hidden;
text-overflow:ellipsis;white-space: nowrap;width: 100%;">{{scope.row.pushPostName}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column label="推送客户">
                    <template slot-scope="scope">
                      <span>{{scope.row.customerName}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column prop="star" label="难易程度">
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        v-if="scope.row.star == 3"
                        style="background-color: #FF1C1D;color: #fff;"
                      >困难
                      </el-button>
                      <el-button
                        size="mini"
                        v-if="scope.row.star == 2"
                        style="background-color: #2931FE;color: #fff;"
                      >普通
                      </el-button>
                      <el-button
                        size="mini"
                        v-if="scope.row.star == 1"
                        style="background-color: #FFC027;color: #fff;"
                      >简单
                      </el-button>
                      <span v-if="scope.row.star == 0">空</span>
                    </template>
                  </el-table-column>
                  <el-table-column  label="应推简历数">
                    <template slot-scope="scope">
                      <span>{{scope.row.count}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column  label="已推简历数">
                    <template slot-scope="scope">
                      <span>{{scope.row.nowCount}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column label="还需推简历数"  width="110">
                    <template slot-scope="scope">
                      <span>{{scope.row.poor}}</span>
                    </template>
                  </el-table-column>
                </el-table>
                <div class="pager">
                  <el-pagination
                    @size-change="handleSizeChange6"
                    @current-change="pagehandleCurrentChange6"
                    :current-page="currentPage6"
                    :page-sizes="[5,10,15]"
                    :page-size="pagesize6"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="totalcount6"
                  ></el-pagination>
                </div>
              </el-col>
            </el-row>
          </el-col>
        </el-col>
        <el-col style="width:50%;">
          <el-col class="tabletitle" style="padding-left: 20px;">
            <h4>小组任务<span style="font-size:14px;"> (小组总任务数：{{groupcount}})</span></h4>
          
          </el-col>
          <el-col style="background-color: #fff;">
            <el-row type="flex" justify="center">
              <el-col :span="23">
                <el-table
                  ref="singleTable3"
                  :data="tableData3"
                  @current-change="handleCurrentChange3"
                >
                  <el-table-column width="150" label="专员">
                    <template slot-scope="scope">
                      <span style="color: #757575;">{{scope.row.pusher}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column label="上传简历数">
                    <template slot-scope="scope">
                      <div
                        style="cursor: pointer;width:100%;text-align:center;color:#1198ff;"
                        @click="viewdata(scope.row)"
                      >
                        <span>{{scope.row.count}}</span>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column label="推送简历数">
                    <template slot-scope="scope">
                      <div
                        style="cursor: pointer;width:100%;text-align:center;color:#1198ff;"
                        @click="viewdata1(scope.row)"
                      >
                        <span>{{scope.row.tscount}}</span>
                      </div>
                    </template>
                  </el-table-column>
                </el-table>
                <div class="pager">
                  <el-pagination
                    @size-change="handleSizeChange3"
                    @current-change="pagehandleCurrentChange3"
                    :current-page="currentPage3"
                    :page-sizes="[5,10,15]"
                    :page-size="pagesize3"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="totalcount3"
                  ></el-pagination>
                </div>
              </el-col>
            </el-row>
          </el-col>
        </el-col>
      </el-row>
      <el-row type="flex" justify="center" style="padding-top: 30px;">
        <el-col :span="24"></el-col>
      </el-row>
      <div style="margin-bottom: 10px;background-color: #fff;" v-if="flag">
        <el-row type="flex" justify="center">
          <el-col :span="23" class="text">
            <el-col :span="12">
              <h4>今日上午</h4>
            </el-col>
            <el-col :span="12">
              <el-col style="width: 65px;float: right;">
                <el-button class="edit" size="small" @click="editam" round>修改</el-button>
              </el-col>
            </el-col>
          </el-col>
        </el-row>
        <el-row type="flex" justify="center">
          <el-col :span="23">
            <el-table
              ref="singleTable"
              highlight-current-row
              :data="tableData"
              @current-change="handleCurrentChange"
            >
              <el-table-column width="100" label="姓名">
                <template slot-scope="scope">
                  <span style="color: #757575;">{{scope.row.name}}</span>
                </template>
              </el-table-column>
              <el-table-column width="100" prop="customerName" label="推送客户"></el-table-column>
              <el-table-column prop="postName" label="推送职位"></el-table-column>
              <el-table-column width="100" prop="postLevel" label="职位级别"></el-table-column>
              <el-table-column prop="initialTime" label="候选人时间"></el-table-column>
              <el-table-column prop="communication" label="前期沟通情况"></el-table-column>
              <el-table-column prop="candidateChangeReason" label="原因"></el-table-column>
            </el-table>
            <div class="pager">
              <el-pagination
                @size-change="handleSizeChange"
                @current-change="pagehandleCurrentChange"
                :current-page="currentPage"
                :page-sizes="[5,10,15]"
                :page-size="pagesize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="totalcount"
              ></el-pagination>
            </div>
          </el-col>
        </el-row>
      </div>
      <div style="margin-bottom: 10px;background-color: #fff;">
        <el-row type="flex" justify="center">
          <el-col :span="23" class="text">
            <el-col :span="12">
              <h4>今日下午</h4>
            </el-col>
            <el-col :span="12">
              <el-col style="width: 65px;float: right;">
                <el-button class="edit" size="small" @click="editpm" round>修改</el-button>
              </el-col>
            </el-col>
          </el-col>
        </el-row>
        <el-row type="flex" justify="center">
          <el-col :span="23">
            <el-table
              ref="singleTable1"
              highlight-current-row
              :data="tableData1"
              @current-change="handleCurrentChange1"
            >
              <el-table-column width="100" label="姓名">
                <template slot-scope="scope">
                  <span style="color: #757575;">{{scope.row.name}}</span>
                </template>
              </el-table-column>
              <el-table-column width="100" prop="customerName" label="推送客户"></el-table-column>
              <el-table-column prop="postName" label="推送职位"></el-table-column>
              <el-table-column width="100" prop="postLevel" label="职位级别"></el-table-column>
              <el-table-column prop="initialTime" label="候选人时间"></el-table-column>
              <el-table-column prop="communication" label="前期沟通情况"></el-table-column>
              <el-table-column prop="candidateChangeReason" label="原因"></el-table-column>
            </el-table>
            <div class="pager">
              <el-pagination
                @size-change="handleSizeChange1"
                @current-change="pagehandleCurrentChange1"
                :current-page="currentPage1"
                :page-sizes="[5,10,15]"
                :page-size="pagesize1"
                layout="total, sizes, prev, pager, next, jumper"
                :total="totalcount1"
              ></el-pagination>
            </div>
          </el-col>
        </el-row>
      </div>
      <div style="margin-bottom: 10px;background-color: #fff;" v-if="flag1">
        <el-row type="flex" justify="center">
          <el-col :span="23" class="text">
            <el-col :span="12">
              <h4>明日上午</h4>
            </el-col>
            <el-col :span="12">
              <el-col style="width: 65px;float: right;">
                <el-button class="edit" size="small" @click="edittm" round>修改</el-button>
              </el-col>
            </el-col>
          </el-col>
        </el-row>
        <el-row type="flex" justify="center">
          <el-col :span="23">
            <el-table
              ref="singleTable2"
              highlight-current-row
              :data="tableData2"
              @current-change="handleCurrentChange2"
            >
              <el-table-column width="100" label="姓名">
                <template slot-scope="scope">
                  <span style="color: #757575;">{{scope.row.name}}</span>
                </template>
              </el-table-column>
              <el-table-column width="100" prop="customerName" label="推送客户"></el-table-column>
              <el-table-column prop="postName" label="推送职位"></el-table-column>
              <el-table-column width="100" prop="postLevel" label="职位级别"></el-table-column>
              <el-table-column prop="initialTime" label="候选人时间"></el-table-column>
              <el-table-column prop="communication" label="前期沟通情况"></el-table-column>
              <el-table-column prop="candidateChangeReason" label="原因"></el-table-column>
            </el-table>
            <div class="pager">
              <el-pagination
                @size-change="handleSizeChange2"
                @current-change="pagehandleCurrentChange2"
                :current-page="currentPage2"
                :page-sizes="[5,10,15]"
                :page-size="pagesize2"
                layout="total, sizes, prev, pager, next, jumper"
                :total="totalcount2"
              ></el-pagination>
            </div>
          </el-col>
        </el-row>
      </div>
      
      <el-row type="flex" justify="center" style="padding-top: 30px;">
        <el-col :span="24"></el-col>
      </el-row>
    </div>
    
    <el-dialog
      title="错误"
      :visible.sync="errordialogVisible"
      width="30%"
      :before-close="handleClose"
      class="deletedialog"
    >
      <div style="text-align: center">
        <i class="el-icon-warning" style="font-size: 20px;color: #fcb543;">
          <span style="font-size: 16px;color: #333;margin-left: 12px;">尚未选择任何候选人!</span>
        </i>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button class="sure" round @click="handleClose">确 定</el-button>
        <el-button round @click="handleClose" class="cancel">取 消</el-button>
      </span>
    </el-dialog>
    
    <el-dialog
      title="修改"
      :visible.sync="editdialogVisible"
      width="415px"
      :before-close="editnumClose"
      class="addroledialog"
    >
      <div style="text-align: left">
        <el-form
          label-position="top"
          ref="editform"
          :model="form"
          :rules="rules"
          style="padding:0px 50px;"
        >
          <el-form-item label="前期沟通情况" prop="result">
            <el-col>
              <el-select v-model.trim="form.result" style="width: 100%;" @change="selectsituation">
                <el-option
                  v-for="(item,index) in situationlist"
                  :label="item"
                  :key="index"
                  :value="item"
                ></el-option>
              </el-select>
            </el-col>
          </el-form-item>
          <el-form-item label="原因" prop="reason">
            <el-col>
              <el-input type="input" v-model.trim="form.reason" placeholder="请输入原因"></el-input>
            </el-col>
          </el-form-item>
          <el-form-item label="面试时间" prop="time" v-if="istime">
            <el-col>
              <el-date-picker
                v-model="form.time"
                type="datetime"
                style="width: 274px;"
                placeholder="请选择面试时间"
              ></el-date-picker>
            </el-col>
          </el-form-item>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button class="sure" round :disabled="editdis" @click="submitForm('editform')">确 定</el-button>
        <el-button round @click="editnumClose" class="cancel">取 消</el-button>
      </span>
    </el-dialog>
    
    <el-dialog :visible.sync="dialogFormVisible" :before-close="cancelSend" class="back1">
      <div class="dialogBox">
        <el-row style="border: 1px solid #ccc;">
          <el-col style="padding-left: 10px;" class="resumepushtable">
            <el-table class="tablelist" ref="mailtable" :data="historydata" border>
              <el-table-column prop="customerName" label="推送客户"></el-table-column>
              <el-table-column prop="postName" label="推送职位"></el-table-column>
              <el-table-column prop="name" label="候选人"></el-table-column>
            </el-table>
            <div class="pager">
              <el-pagination
                @size-change="handleSizeChange4"
                @current-change="pagehandleCurrentChange4"
                :current-page="currentPage4"
                :page-sizes="[5,10,15]"
                :page-size="pagesize4"
                layout="total, sizes, prev, pager, next, jumper"
                :total="totalcount4"
              ></el-pagination>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-dialog>
    <el-dialog :visible.sync="dialogFormVisible1" :before-close="cancelSend1" class="back1">
      <div class="dialogBox">
        <el-row style="border: 1px solid #ccc;">
          <el-col style="padding-left: 10px;" class="resumepushtable">
            <el-table class="tablelist" ref="mailtable" :data="historydata1" border>
              <el-table-column prop="candidatename" label="候选人"></el-table-column>
              <el-table-column prop="postname" label="推送职位"></el-table-column>
              <el-table-column prop="customerName" label="推送客户"></el-table-column>
              
              <el-table-column prop="star" label="难易程度">
                <template slot-scope="scope">
                  <el-button
                    size="mini"
                    v-if="scope.row.star == 3"
                    style="background-color: #FF1C1D;color: #fff;"
                  >困难
                  </el-button>
                  <el-button
                    size="mini"
                    v-if="scope.row.star == 2"
                    style="background-color: #2931FE;color: #fff;"
                  >普通
                  </el-button>
                  <el-button
                    size="mini"
                    v-if="scope.row.star == 1"
                    style="background-color: #FFC027;color: #fff;"
                  >简单
                  </el-button>
                  <span v-if="scope.row.star == 0">空</span>
                </template>
              </el-table-column>
            </el-table>
            <div class="pager">
              <el-pagination
                @size-change="handleSizeChange5"
                @current-change="pagehandleCurrentChange5"
                :current-page="currentPage5"
                :page-sizes="[5,10,15]"
                :page-size="pagesize5"
                layout="total, sizes, prev, pager, next, jumper"
                :total="totalcount5"
              ></el-pagination>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-dialog>
    
    <my-task v-if="detailShow" @requireTask="requiretask" :id="id"></my-task>
  </div>
</template>
<script>
  import axios from "axios";
  import MyTask from "./mytask";
  
  export default {
    name: "todaytaskleader",
    data() {
      return {
        owntodaytaskinfo: [],
        membertodaytaskinfo: [],
        detailShow: false,
        id: "",
        groupcount: "",
        secondtitle: "",
        secondshow: false,
        tabPosition: "left",
        finish: "",
        total: "",
        nothandlenum: "",
        activeName: "first",
        notfeedbacknum: "",
        type: 1,
        colorlist: ["#28c7c8", "#9492d6", "#4bcfa5"],
        searchword: "",
        uploadlist: [],
        name: "",
        namelist: [],
        tableData: [],
        currentPage: 1,
        pagesize: 5,
        totalcount: 0,
        currentRow: null,
        tableData1: [],
        currentPage1: 1,
        pagesize1: 5,
        totalcount1: 0,
        currentRow1: null,
        tableData2: [],
        currentPage2: 1,
        pagesize2: 5,
        totalcount2: 0,
        currentRow2: null,
        detaildata: "",
        detaildata1: "",
        tableData3: [],
        currentPage3: 1,
        pagesize3: 5,
        totalcount3: 0,
        currentRow3: null,
        historydata: [],
        historydata1: [],
        currentPage4: 1,
        pagesize4: 5,
        totalcount4: 0,
        currentRow4: null,
        currentPage5: 1,
        pagesize5: 5,
        totalcount5: 0,
        currentRow5: null,
        tableData6: [],
        currentPage6: 1,
        pagesize6: 5,
        totalcount6: 0,
        currentRow6: null,
        dialogFormVisible: false,
        dialogFormVisible1: false,
        enpusher: "",
        errordialogVisible: false,
        editdialogVisible: false,
        editdis: false,
        form: {
          id: "",
          result: "",
          reason: "",
          time: ""
        },
        rules: {
          result: [
            {required: true, message: "请选择前期沟通情况", trigger: "change"}
          ],
          reason: [{required: true, message: "请填写原因", trigger: "blur"}],
          time: [{required: true, message: "请选择面试时间", trigger: "change"}]
        },
        situationlist: [
          "准时",
          "放弃",
          "不去面试时间待定",
          "晚点",
          "更换面试时间"
        ],
        istime: false,
        flag: false,
        flag1: false,
        type: null
      };
    },
    created() {
      
      this.selectinterviewforhr1();
      this.selectinterviewforhr2();
      this.selectinterviewforhr3();
      this.selectinterviewforhr4();
      this.selectinterviewforhr6();
      
      axios.post(this.url + "/todaytask/selectgroupmember").then(res => {
        this.unlogin(res.data.code);
        if (res.data.code == 200) {
          this.namelist = res.data.data;
          // this.name = this.namelist[0].username;
        }
      });
      axios.post(this.url + "/todaytask/selectgroupcount").then(res => {
        this.unlogin(res.data.code);
        if (res.data.code == 200) {
          this.groupcount = res.data.data;
        }
      });
    },
    components: {
      MyTask
    },
    methods: {
      //今日上午
      selectinterviewforhr1() {
        axios
          .post(this.url + "/todayinterview/selectinterviewforhr1", {
            pageNum: this.currentPage,
            pageSize: this.pagesize
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              if (res.data.data !== null) {
                this.flag = true;
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              } else {
                this.flag = false;
              }
            }
          });
      },
      //今日下午
      selectinterviewforhr2() {
        axios
          .post(this.url + "/todayinterview/selectinterviewforhr2", {
            pageNum: this.currentPage1,
            pageSize: this.pagesize1
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.tableData1 = res.data.data.list;
              this.totalcount1 = res.data.data.total;
            }
          });
      },
      //明天上午
      selectinterviewforhr3() {
        axios
          .post(this.url + "/todayinterview/selectinterviewforhr3", {
            pageNum: this.currentPage2,
            pageSize: this.pagesize2
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              if (res.data.data !== null) {
                this.flag1 = true;
                this.tableData2 = res.data.data.list;
                this.totalcount2 = res.data.data.total;
              }
            } else {
              this.flag1 = false;
            }
          });
      },
      //小组任务
      selectinterviewforhr4() {
        axios
          .post(this.url + "/todaytask/gettaday", {
            pageNum: this.currentPage3,
            pageSize: this.pagesize3
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.tableData3 = res.data.data.list;
              this.totalcount3 = res.data.data.total;
            }
          });
      },
      //岗位任务
      selectinterviewforhr6() {
        axios
          .post(this.url + "/todaytask/gettodaytask", {
            pageNum: this.currentPage6,
            pageSize: this.pagesize6
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.tableData6 = res.data.data.list;
              this.totalcount6 = res.data.data.total;
            }
          });
      },
      selectsituation() {
        if (this.form.result == "晚点" || this.form.result == "更换面试时间") {
          this.form.reason = "";
          this.istime = true;
          this.form.time = "";
        } else {
          this.form.time = "";
          this.form.reason = "";
          this.istime = false;
        }
        
        if (this.form.result == "准时") {
          this.form.reason = "该候选人准时到达面试现场";
        }
      },
      selectname() {
        axios
          .post(this.url + "/todaytask/selectfinishresume", {
            name: this.name
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.uploadlist = res.data.data;
            }
          });
      },
      mytask(id) {
        this.id = id;
        this.detailShow = !this.detailShow;
        this.secondtitle = "查看任务详情";
        this.secondshow = !this.secondshow;
      },
      requiretask() {
        this.secondtitle = "查看需求详情";
        this.detailShow = true;
        this.secondshow = true;
      },
      tableshow() {
        this.detailShow = false;
        this.secondshow = false;
        // this.getData();
      },
      editam() {
        if (this.currentRow == null) {
          document.documentElement.style.overflow = "hidden";
          this.errordialogVisible = true;
        } else {
          this.type = 1;
          document.documentElement.style.overflow = "hidden";
          this.editdialogVisible = true;
          this.form.id = this.currentRow.id;
          this.form.result = this.currentRow.communication;
          this.form.reason = this.currentRow.candidateChangeReason;
          this.form.time = this.currentRow.candidateTime;
          
          if (this.form.result == "晚点" || this.form.result == "更换面试时间") {
            this.istime = true;
          } else {
            this.istime = false;
          }
          
          if (this.form.result == "准时") {
            this.form.reason = "该候选人准时到达面试现场";
          }
        }
      },
      editpm() {
        if (this.currentRow1 == null) {
          document.documentElement.style.overflow = "hidden";
          this.errordialogVisible = true;
        } else {
          this.type = 2;
          document.documentElement.style.overflow = "hidden";
          this.editdialogVisible = true;
          this.form.id = this.currentRow1.id;
          this.form.result = this.currentRow1.communication;
          this.form.reason = this.currentRow1.candidateChangeReason;
          this.form.time = this.currentRow1.candidateTime;
          
          if (this.form.result == "晚点" || this.form.result == "更换面试时间") {
            this.istime = true;
          } else {
            this.istime = false;
          }
          
          if (this.form.result == "准时") {
            this.form.reason = "该候选人准时到达面试现场";
          }
        }
      },
      edittm() {
        if (this.currentRow2 == null) {
          document.documentElement.style.overflow = "hidden";
          this.errordialogVisible = true;
        } else {
          this.type = 3;
          document.documentElement.style.overflow = "hidden";
          this.editdialogVisible = true;
          this.form.id = this.currentRow2.id;
          this.form.result = this.currentRow2.communication;
          this.form.reason = this.currentRow2.candidateChangeReason;
          this.form.time = this.currentRow2.candidateTime;
          
          if (this.form.result == "晚点" || this.form.result == "更换面试时间") {
            this.istime = true;
          } else {
            this.istime = false;
          }
          
          if (this.form.result == "准时") {
            this.form.reason = "该候选人准时到达面试现场";
          }
        }
      },
      handleClose(done) {
        this.errordialogVisible = false;
        document.documentElement.style.overflow = "auto";
      },
      submitForm(formName) {
        this.$refs[formName].validate(valid => {
          if (valid) {
            axios
              .post(this.url + "/todayinterview/updateinterviewtime", this.form)
              .then(res => {
                this.unlogin(res.data.code);
                if (res.data.code == 200) {
                  if (this.type == 1) {
                    this.selectinterviewforhr1();
                  }
                  if (this.type == 2) {
                    this.selectinterviewforhr2();
                  }
                  if (this.type == 3) {
                    this.selectinterviewforhr3();
                  }
                  document.documentElement.style.overflow = "auto";
                  this.editdialogVisible = false;
                  this.$refs.editform.resetFields();
                }
              });
          }
        });
      },
      editnumClose() {
        if (this.type == 1) {
          this.$refs.singleTable.clearSelection();
          this.selectinterviewforhr1();
          this.type = null;
        }
        if (this.type == 2) {
          this.$refs.singleTable1.clearSelection();
          this.selectinterviewforhr2();
          this.type = null;
        }
        if (this.type == 3) {
          this.$refs.singleTable2.clearSelection();
          this.selectinterviewforhr3();
          this.type = null;
        }
        this.$refs.editform.resetFields();
        document.documentElement.style.overflow = "auto";
        this.editdialogVisible = false;
      },
      getcandidatedetail(val) {
        this.detaildata1 = val;
        this.dialogFormVisible1 = true;
        axios
          .post(this.url + "/todaytask/getcandidatedetail", {
            enpusher: this.detaildata1.enpusher,
            pageNum: this.currentPage5,
            pageSize: this.pagesize5
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.historydata1 = res.data.data.list;
              this.totalcount5 = res.data.data.total;
            }
          });
      },
      viewdata(val) {
        this.detaildata = val;
        this.dialogFormVisible = true;
        axios
          .post(this.url + "/todaytask/pushresumealldetail", {
            enpusher: this.detaildata.enpusher,
            pageNum: this.currentPage4,
            pageSize: this.pagesize4
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.historydata = res.data.data.list;
              this.totalcount4 = res.data.data.total;
            }
          });
      },
      
      viewdata1(val) {
        this.detaildata = val;
        this.dialogFormVisible = true;
        axios
          .post(this.url + "/todaytask/psresumealldetail", {
            enpusher: this.detaildata.enpusher,
            pageNum: this.currentPage4,
            pageSize: this.pagesize4
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.historydata = res.data.data.list;
              this.totalcount4 = res.data.data.total;
            }
          });
      },
      //上午
      handleSizeChange(val) {
        this.pagesize = val;
        this.selectinterviewforhr1();
      },
      handleCurrentChange(val) {
        this.currentRow = val;
      },
      pagehandleCurrentChange(val) {
        this.currentPage = val;
        this.selectinterviewforhr1();
      },
      //下午
      handleSizeChange1(val) {
        this.pagesize1 = val;
        this.selectinterviewforhr2();
      },
      handleCurrentChange1(val) {
        this.currentRow1 = val;
      },
      pagehandleCurrentChange1(val) {
        this.currentPage1 = val;
        this.selectinterviewforhr2();
      },
      //明天上午
      handleSizeChange2(val) {
        this.pagesize2 = val;
        this.selectinterviewforhr3();
      },
      handleCurrentChange2(val) {
        this.currentRow2 = val;
      },
      pagehandleCurrentChange2(val) {
        this.currentPage2 = val;
        this.selectinterviewforhr3();
      },
      //小组任务
      handleSizeChange3(val) {
        this.pagesize3 = val;
        this.selectinterviewforhr4();
      },
      handleCurrentChange3(val) {
        this.currentRow3 = val;
      },
      pagehandleCurrentChange3(val) {
        this.currentPage3 = val;
        this.selectinterviewforhr4();
      },
      //弹框
      handleSizeChange4(val) {
        this.pagesize4 = val;
        axios
          .post(this.url + "/todaytask/pushresumealldetail", {
            enpusher: this.detaildata.enpusher,
            pageNum: this.currentPage4,
            pageSize: this.pagesize4
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.historydata = res.data.data.list;
              this.totalcount4 = res.data.data.total;
            }
          });
      },
      handleCurrentChange4(val) {
        this.currentRow4 = val;
      },
      pagehandleCurrentChange4(val) {
        this.currentPage4 = val;
        axios
          .post(this.url + "/todaytask/pushresumealldetail", {
            enpusher: this.detaildata.enpusher,
            pageNum: this.currentPage4,
            pageSize: this.pagesize4
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.historydata = res.data.data.list;
              this.totalcount4 = res.data.data.total;
            }
          });
      },
      //弹框
      handleCurrentChange5(val) {
        this.currentRow5 = val;
        // console.log(this.currentRow5);
      },
      handleSizeChange5(val) {
        this.pagesize5 = val;
        // console.log(this.pagesize5);
        axios
          .post(this.url + "/todaytask/getcandidatedetail", {
            enpusher: this.detaildata1.enpusher,
            pageNum: this.currentPage5,
            pageSize: this.pagesize5
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.historydata1 = res.data.data.list;
              this.totalcount5 = res.data.data.total;
            }
          });
      },
      
      pagehandleCurrentChange5(val) {
        // console.log(this.detaildata1.enpusher);
        this.currentPage5 = val;
        axios
          .post(this.url + "/todaytask/getcandidatedetail", {
            enpusher: this.detaildata1.enpusher,
            pageNum: this.currentPage5,
            pageSize: this.pagesize5
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.historydata1 = res.data.data.list;
              this.totalcount5 = res.data.data.total;
            }
          });
      },
      //岗位任务
      handleSizeChange6(val) {
        this.pagesize6 = val;
        this.selectinterviewforhr6();
      },
      handleCurrentChange6(val) {
        this.currentRow6 = val;
      },
      pagehandleCurrentChange6(val) {
        this.currentPage6 = val;
        this.selectinterviewforhr6();
      },
      
      cancelSend() {
        this.historydata = [];
        this.currentPage4 = 1;
        this.disabled = false;
        this.dialogFormVisible = false;
        document.documentElement.style.overflow = "auto";
      },
      cancelSend1() {
        this.historydata1 = [];
        this.currentPage5 = 1;
        this.disabled = false;
        this.dialogFormVisible1 = false;
        document.documentElement.style.overflow = "auto";
      },
      tableRowClassName({row, rowIndex}) {
        if (row.poor == "已完成") {
          return "color-row";
        } else {
          return "";
        }
      }
    }
  };
</script>
<style scoped>
  .title {
    background-color: #fff;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    padding-left: 20px;
    margin-top: 6px;
    margin-bottom: 6px;
  }
  
  .posttable {
    min-height: 700px;
    background-color: #f4f7f9;
  }
  
  .tabletitle {
    height: 50px;
    line-height: 50px;
    background-color: #fff;
  }
  
  .box {
    width: 95%;
    height: 194px;
    border: 2px solid #ececec;
  }
  
  .mytitle {
    margin-top: 18px;
    font-size: 20px;
    color: #333;
    font-weight: 700;
    letter-spacing: 2px;
  }
  
  .secondtitle {
    color: #119aff;
    cursor: pointer;
  }
  
  .list {
    height: 44px;
    margin-top: 30px;
    padding-left: 20px;
    /*line-height: 97px;*/
  }
  
  .list i {
    font-size: 42px;
    color: #1397fc;
  }
  
  .mainlist:nth-child(1) .list {
    border-right: 1px solid #ccc;
  }
  
  .mainlist:nth-child(2) .list {
    border-right: 1px solid #ccc;
  }
  
  .pan {
    width: 95%;
    height: 290px;
    position: relative;
    background-color: #fff;
    border: 2px solid #ececec;
    /*margin: 0 auto;*/
  }
  
  .role {
    width: 62%;
    height: 48px;
    line-height: 48px;
    background-color: #2cc6c9;
    color: #fff;
    position: absolute;
    left: 50%;
    top: -8%;
    transform: translate(-50%);
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
  }
  
  .job {
    font-size: 14px;
    min-height: 63.3px;
  }
  
  .textactive {
    color: #1099ff;
  }
  
  .job p {
    cursor: pointer;
  }
  
  .tasklist {
    margin-bottom: 60px;
  }
  
  /*.tasklist:nth-last-child(1) img {*/
  /*  width: 90%;*/
  /*}*/
  
  .tasklist:nth-child(3n) .pan {
    width: 100%;
  }
  
  .num {
    width: 18px;
    height: 18px;
    border: 1px solid #dfdede;
    margin-top: 17px;
    margin-left: 8px;
    text-align: center;
    line-height: 15px;
    font-size: 12px;
    color: #c2c2c3;
  }
  
  .num.active {
    border-color: #1397fe;
  }
  
  .resumeNum {
    font-size: 14px;
    color: #000;
  }
  
  .button {
    width: 50px;
    height: 24px;
    background-color: #d6ecf9;
    line-height: 24px;
    text-align: center;
    font-size: 12px;
    margin-top: 14px;
  }
  
  .numcolor {
    color: #fe5352;
  }
  
  .table {
    width: 98%;
  }
  
  .list2 {
    width: 274px;
    margin-left: 18px;
    margin-right: 20px;
    background-color: #f4f7f9;
    line-height: 50px;
    height: 50px;
    cursor: pointer;
  }
  
  .active {
    color: #1397fe;
  }
  
  .pager {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  
  .el-pagination {
    margin-left: 50%;
    transform: translateX(-50%);
  }
  
  .numtext {
    line-height: 1;
    color: #757575;
    font-size: 16px;
  }
  
  .pic {
    width: 90%;
  }
  
  @media screen and (min-width: 1200px) and (max-width: 1900px) {
    .left {
      margin-left: 8.33333%;
    }
  }
  
  @media only screen and (min-width: 1920px) {
    .left {
      margin-left: 2%;
    }
  }
  
  .left1 {
    margin-right: 20px;
  }
  
  .iconcolor {
    color: #3688e9;
  }
  
  .other {
    color: #757575;
    cursor: pointer;
    text-decoration: none;
  }
  
  .edit {
    width: 65px;
    height: 28px;
    padding: 7px 15px !important;
    opacity: 0.86;
    color: #fff;
    background: linear-gradient(to bottom, #00cebf 0%, #009085 100%);
  }
  
  .text {
    height: 50px;
    line-height: 50px;
  }
</style>
